package cate.common.table.pvp.ladder;

import cate.common.table.ESheet;

import java.util.Optional;

public class LadderRefreshSheet extends ESheet<LadderRefreshRow> {

    @Override
    public String getSheetName() {
        return "天梯争霸战斗刷新";
    }

    public LadderRefreshRow findRow(int rank) {
        return getList()
                .stream()
                .filter(row -> rank >= row.begin && rank <= row.end)
                .findFirst()
                .orElse(null);
    }
}
